Helpful Information
 
 
Category: Oracle Development
"Oracle Error: -22275/ORA-22275:invalid LOB locator specified"/dbms_lob.freetemporary

/* Function pck_raw.if_read_long_raw() */

function if_read_long_raw(ps_tableName in varchar2, ps_rawColumn in varchar2, ps_pkColumn in varchar2, pde_pkValue in number, pb_blobData out nocopy blob, pde_ht_id out number)
return number is

de_id number default 0;
de_status number default 1;
de_return number default 1;

begin
de_id := pck_raw.if_create_empty_blob();
pde_ht_id := de_id;

pck_message_proz.ipr_debug_message('id geholt. id: '||de_id);

/* 1 */
de_status := pck_raw.if_read(ps_tableName,ps_rawColumn, ps_pkColumn, pde_pkValue, de_id);

/* 2 */
select htb_blob into pb_blobData from ht_blob where htb_instanz = de_id;

return de_return;
end if_read_long_raw;

/* 1 */
/* Reads a Long raw from the specified Table an Column and stores the Data into table
"ht_blob" with the primary key de_id */

/* 2 */
/* Selects the written Blob from this table "ht_blob" into the overgiven blob */


/* This is a piece of my package */
/* this part creates a temporary blob, calls the function below and frees the temp. blob */

-------------------------------

bl_file blob;

dbms_lob.createtemporary(bl_file,true);

-- Read a long-Raw from DB into bl_file
de_status := pck_raw.if_read_long_raw('druckdokumentenzst','drdz_dokument', 'drdz_instanz', de_key_instanz, bl_file, de_ht_id);

/* 3 */
dbms_lob.freetemporary(bl_file);

--------------------------------

Now my problem is, that when i call dbms_lob.freetemporary(bl_file) /* 3 */ a
"Oracle Error: -22275/ORA-22275: invalid LOB locator specified" occours.

Does anyone know why??

Thanks for helping..

Flo..

/* Function pck_raw.if_read_long_raw() */

function if_read_long_raw(ps_tableName in varchar2, ps_rawColumn in varchar2, ps_pkColumn in varchar2, pde_pkValue in number, pb_blobData out nocopy blob, pde_ht_id out number)
return number is

de_id number default 0;
de_status number default 1;
de_return number default 1;

begin
de_id := pck_raw.if_create_empty_blob();
pde_ht_id := de_id;

pck_message_proz.ipr_debug_message('id geholt. id: '||de_id);

/* 1 */
de_status := pck_raw.if_read(ps_tableName,ps_rawColumn, ps_pkColumn, pde_pkValue, de_id);

/* 2 */
select htb_blob into pb_blobData from ht_blob where htb_instanz = de_id;

return de_return;
end if_read_long_raw;

/* 1 */
/* Reads a Long raw from the specified Table an Column and stores the Data into table
"ht_blob" with the primary key de_id */

/* 2 */
/* Selects the written Blob from this table "ht_blob" into the overgiven blob */


/* This is a piece of my package */
/* this part creates a temporary blob, calls the function below and frees the temp. blob */

-------------------------------

bl_file blob;

dbms_lob.createtemporary(bl_file,true);

-- Read a long-Raw from DB into bl_file
de_status := pck_raw.if_read_long_raw('druckdokumentenzst','drdz_dokument', 'drdz_instanz', de_key_instanz, bl_file, de_ht_id);

/* 3 */
dbms_lob.freetemporary(bl_file);

--------------------------------

Now my problem is, that when i call dbms_lob.freetemporary(bl_file) /* 3 */ a
"Oracle Error: -22275/ORA-22275: invalid LOB locator specified" occours.

Does anyone know why??

Thanks for helping..

Flo..


Just google it, you can get some idea. Here is some good info which I got:

"Cause: There are several causes: (1) the LOB locator was never initialized; (2) the locator is for a BFILE and the routine expects a BLOB/CLOB/NCLOB locator; (3) the locator is for a BLOB/CLOB/NCLOB and the routine expects a BFILE locator; (4) trying to update the LOB in a trigger body -- LOBs in trigger bodies are read only; (5) the locator is for a BFILE/BLOB and the routine expects a CLOB/NCLOB locator; (6) the locator is for a CLOB/NCLOB and the routine expects a BFILE/BLOB locator;

Action: For (1), initialize the LOB locator by selecting into the locator variable or by setting the LOB locator to empty. For (2),(3), (5) and (6)pass the correct type of locator into the routine. For (4), remove the trigger body code that updates the LOB value."



Reference: ora-error .com website










privacy (GDPR)